package com.qianli.cashmama.trade.domain.services;

import com.qianli.cashmama.trade.client.bill.request.BillPayRequest;
import com.qianli.cashmama.trade.domain.model.BillBase;
import com.qianli.cashmama.trade.domain.model.TradeBase;
import com.qianli.cashmama.trade.integration.product.dto.ProductDto;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/8/7
 * Time: 下午8:09
 */
public interface CapitalCalculateService {

    /**
     * 通过产品计算交易
     *
     * @param productDto
     * @return
     */
    TradeBase calculateTrade(TradeBase tradeBase, ProductDto productDto);


    /**
     * 通过账单完善交易信息
     *
     * @param tradeBase
     * @param billBase
     * @return
     */
    TradeBase calculateTradeWithBill(TradeBase tradeBase, BillBase billBase);


    /**
     * 通过交易生成账单
     *
     * @param tradeBase
     * @return
     */
    List<BillBase> calculateBillWithTrade(TradeBase tradeBase);


    /**
     * 通过还款来构造bill
     * @param request
     * @return
     */
    BillBase calculateBill(BillPayRequest request);
}
